package io.renren.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * 课程
 * 
 * @author Mark
 * @email sunlightcs@gmail.com
 * @date 2021-10-11 09:28:47
 */
@Data
@TableName("jx_course_type")
public class JxCourseTypeEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 课程id
	 */
	@TableId
	private Long id;
	/**
	 * 课程名称
	 */
	@NotBlank(message="请填写课程名称", groups = {AddGroup.class, UpdateGroup.class})
	private String name;
	/**
	 * 上级部门名称
	 */
	@TableField(exist=false)
	private String parentName;
	/**
	 * 课程介绍
	 */
	@NotBlank(message="请填写课程介绍", groups = {AddGroup.class, UpdateGroup.class})
	private String courseTypeDesc;
	/**
	 * 父级id
	 */
	private Long parentId;
	/**
	 * ztree属性
	 */
	@TableField(exist=false)
	private Boolean open;

	@TableLogic
	private Integer delFlag;

	/**
	 * 等级
	 */
	private Integer level;

	/**
	 * 排序
	 */
	@NotNull(message="请填写排序", groups = {AddGroup.class, UpdateGroup.class})
	private Integer  orderNum;
	@TableField(exist=false)
	private List<?> list;
}
